package ma.projet.managedbean;

import java.io.Serializable;


import ma.projet.beans.Patient;
import ma.projet.service.PatientService;

import org.primefaces.event.SelectEvent;
import org.primefaces.model.DefaultScheduleEvent;

import org.primefaces.model.ScheduleEvent;


public class ScheduleController implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private ScheduleEvent event = new DefaultScheduleEvent();
	private Patient patient;
	
	public ScheduleController() {
		patient=new Patient();
	}



	public ScheduleEvent getEvent() {
		return event;
	}

	public void setEvent(ScheduleEvent event) {
		this.event = event;
	}

	public void onEventSelect(SelectEvent selectEvent) {
		event = (ScheduleEvent) selectEvent.getObject();

		
		patient=((Patient)event.getData());
		System.out.println(patient.getAdresse());

	}

	

	public Patient getPatient() {
		return patient;
	}



	public void setPatient(Patient patient) {
		this.patient = patient;
	}






	

}